home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- BorderStyle = 1 'Fixed Single
- Caption = "SXTN Viewer (v1.09) - Copyright
- 1994-1996 by J.M."
- ClientHeight = 6420
- ClientLeft = 1065
- ClientTop = 1500
- ClientWidth = 7080
- ClipControls = 0 'False
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 6825
- Icon = "SXTNVIEW.frx":0000
- Left = 1005
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6420
- ScaleWidth = 7080
- Top = 1155
- Width = 7200
- Begin VB.CommandButton Command7
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Sto&p Action"
- Height = 375
- Left = 5160
- TabIndex = 28
- Top = 1815
- Width = 1815
- End
- Begin VB.CommandButton Command6
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Get &Called Items"
- Height = 375
- Left = 5160
- TabIndex = 27
- Top = 2760
- Width = 1815
- End
- Begin VB.CommandButton Command5
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Get &Defined Items"
- Height = 375
- Left = 5160
- TabIndex = 25
- Top = 3720
- Width = 1815
- End
- Begin VB.OptionButton Option5
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- Caption = "LFT"
- ForeColor = &H80000008&
- Height = 255
- Left = 4200
- TabIndex = 24
- Top = 120
- Width = 735
- End
- Begin VB.OptionButton Option4
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- Caption = "FFT"
- ForeColor = &H80000008&
- Height = 255
- Left = 3480
- TabIndex = 19
- Top = 120
- Width = 735
- End
- Begin VB.OptionButton Option3
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- Caption = "DFT"
- ForeColor = &H80000008&
- Height = 255
- Left = 2760
- TabIndex = 18
- Top = 120
- Width = 735
- End
- Begin VB.OptionButton Option2
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- Caption = "CST"
- ForeColor = &H80000008&
- Height = 255
- Left = 2040
- TabIndex = 17
- Top = 120
- Width = 735
- End
- Begin VB.OptionButton Option1
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- Caption = "CFT"
- ForeColor = &H80000008&
- Height = 255
- Left = 1320
- TabIndex = 0
- Top = 120
- Width = 735
- End
- Begin VB.CommandButton Command4
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Get &All Items"
- Height = 375
- Left = 5160
- TabIndex = 14
- Top = 3240
- Width = 1815
- End
- Begin VB.CommandButton Command3
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Get &Files"
- Height = 375
- Left = 5160
- TabIndex = 16
- Top = 4920
- Width = 1815
- End
- Begin VB.ListBox List2
- Appearance = 0 'Flat
- Height = 1395
- Left = 120
- TabIndex = 12
- Top = 4920
- Width = 4935
- End
- Begin VB.ListBox List1
- Appearance = 0 'Flat
- Height = 1395
- Left = 120
- TabIndex = 10
- Top = 3240
- Width = 4935
- End
- Begin VB.CommandButton Command2
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "&Search item"
- Height = 375
- Left = 5160
- TabIndex = 9
- Top = 2295
- Width = 1815
- End
- Begin VB.TextBox Text1
- Appearance = 0 'Flat
- Height = 285
- Left = 1200
- TabIndex = 7
- Top = 2280
- Width = 3855
- End
- Begin VB.CommandButton Command1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "E&xit"
- Height = 500
- Left = 5175
- TabIndex = 4
- Top = 105
- Width = 1815
- End
- Begin VB.FileListBox File1
- Appearance = 0 'Flat
- Height = 1395
- Left = 120
- Pattern = "*.dbf"
- TabIndex = 2
- Top = 720
- Width = 2175
- End
- Begin VB.DirListBox Dir1
- Appearance = 0 'Flat
- Height = 1155
- Left = 2400
- TabIndex = 1
- Top = 1080
- Width = 2655
- End
- Begin VB.DriveListBox Drive1
- Appearance = 0 'Flat
- Height = 315
- Left = 2400
- TabIndex = 20
- Top = 720
- Width = 2655
- End
- Begin VB.Label Label11
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Select database from file dialog"
- ForeColor = &H80000008&
- Height = 495
- Left = 5190
- TabIndex = 26
- Top = 735
- Width = 1455
- End
- Begin VB.Label Label10
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Double click on file to show file contents"
- ForeColor = &H80000008&
- Height = 495
- Left = 5160
- TabIndex = 23
- Top = 5400
- Width = 1815
- End
- Begin VB.Label Label9
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Double click on item to get location"
- ForeColor = &H80000008&
- Height = 495
- Left = 5160
- TabIndex = 22
- Top = 4200
- Width = 1815
- End
- Begin VB.Label Label8
- Appearance = 0 'Flat
- BackColor = &H00FFFF00&
- BackStyle = 0 'Transparent
- Caption = "SXTN-Type"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 21
- Top = 120
- Width = 1095
- End
- Begin VB.Label Label7
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BorderStyle = 1 'Fixed Single
- ForeColor = &H80000008&
- Height = 255
- Left = 1200
- TabIndex = 15
- Top = 2640
- Width = 3855
- End
- Begin VB.Label Label6
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Files"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 4680
- Width = 4935
- End
- Begin VB.Label Label5
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Items"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 11
- Top = 3000
- Width = 4935
- End
- Begin VB.Label Label4
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "File/Line"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 8
- Top = 2640
- Width = 975
- End
- Begin VB.Label Label3
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Search for"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 6
- Top = 2280
- Width = 975
- End
- Begin VB.Label Label2
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BackStyle = 0 'Transparent
- Caption = "Database:"
- ForeColor = &H80000008&
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 480
- Width = 855
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- ForeColor = &H80000008&
- Height = 255
- Left = 1080
- TabIndex = 3
- Top = 480
- Width = 3975
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- '/***************************************************************************/
- ' Copyright (C) Juergen Mueller (J.M.) 1994-1996
- ' All rights reserved.
- ' You are expressly prohibited from selling this software in any form,
- ' distributing it with another product, or removing this notice.
- ' Limited permission is given to registered SXT users to modify this
- ' file for their own personal use only. This file may not be used for any
- ' purpose other than in conjunction with the SXT software package.
- ' THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
- ' EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE
- ' IMPLIED WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR
- ' PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
- ' PROGRAM AND DOCUMENTATION IS WITH YOU.
- ' written by: Juergen Mueller, Aldingerstrasse 22, D-70806 Kornwestheim,
- ' GERMANY
- '/***************************************************************************/
- '**** CFT declarations ****
- #If Win32 Then
- Private Declare Function cftnGetLocation Lib "cftn32.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function cftnGetFirstName Lib "cftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetNextName Lib "cftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetFirstDefName Lib "cftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetNextDefName Lib "cftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetFirstCalledItem Lib "cftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cftnGetNextCalledItem Lib "cftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cftnGetFirstFile Lib "cftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetNextFile Lib "cftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- #Else
- Private Declare Function cftnGetLocation Lib "cftn16.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function cftnGetFirstName Lib "cftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetNextName Lib "cftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetFirstDefName Lib "cftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetNextDefName Lib "cftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetFirstCalledItem Lib "cftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cftnGetNextCalledItem Lib "cftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cftnGetFirstFile Lib "cftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cftnGetNextFile Lib "cftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- #End If
- '**** CST declarations ****
- #If Win32 Then
- Private Declare Function cstnGetLocation Lib "cstn32.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function cstnGetFirstName Lib "cstn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetNextName Lib "cstn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetFirstDefName Lib "cstn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetNextDefName Lib "cstn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetFirstCalledItem Lib "cstn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cstnGetNextCalledItem Lib "cstn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cstnGetFirstFile Lib "cstn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetNextFile Lib "cstn32.dll" (ByVal dbfname$, ByVal location$) As Long
- #Else
- Private Declare Function cstnGetLocation Lib "cstn16.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function cstnGetFirstName Lib "cstn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetNextName Lib "cstn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetFirstDefName Lib "cstn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetNextDefName Lib "cstn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetFirstCalledItem Lib "cstn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cstnGetNextCalledItem Lib "cstn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function cstnGetFirstFile Lib "cstn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function cstnGetNextFile Lib "cstn16.dll" (ByVal dbfname$, ByVal location$) As Long
- #End If
- '**** DFT declarations ****
- #If Win32 Then
- Private Declare Function dftnGetLocation Lib "dftn32.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function dftnGetFirstName Lib "dftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetNextName Lib "dftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetFirstDefName Lib "dftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetNextDefName Lib "dftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetFirstCalledItem Lib "dftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function dftnGetNextCalledItem Lib "dftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function dftnGetFirstFile Lib "dftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetNextFile Lib "dftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- #Else
- Private Declare Function dftnGetLocation Lib "dftn16.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function dftnGetFirstName Lib "dftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetNextName Lib "dftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetFirstDefName Lib "dftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetNextDefName Lib "dftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetFirstCalledItem Lib "dftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function dftnGetNextCalledItem Lib "dftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function dftnGetFirstFile Lib "dftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function dftnGetNextFile Lib "dftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- #End If
- '**** FFT declarations ****
- #If Win32 Then
- Private Declare Function fftnGetLocation Lib "fftn32.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function fftnGetFirstName Lib "fftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetNextName Lib "fftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetFirstDefName Lib "fftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetNextDefName Lib "fftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetFirstCalledItem Lib "fftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function fftnGetNextCalledItem Lib "fftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function fftnGetFirstFile Lib "fftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetNextFile Lib "fftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- #Else
- Private Declare Function fftnGetLocation Lib "fftn16.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function fftnGetFirstName Lib "fftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetNextName Lib "fftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetFirstDefName Lib "fftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetNextDefName Lib "fftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetFirstCalledItem Lib "fftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function fftnGetNextCalledItem Lib "fftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function fftnGetFirstFile Lib "fftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function fftnGetNextFile Lib "fftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- #End If
- '**** LFT declarations ****
- #If Win32 Then
- Private Declare Function lftnGetLocation Lib "lftn32.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function lftnGetFirstName Lib "lftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetNextName Lib "lftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetFirstDefName Lib "lftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetNextDefName Lib "lftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetFirstCalledItem Lib "lftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function lftnGetNextCalledItem Lib "lftn32.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function lftnGetFirstFile Lib "lftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetNextFile Lib "lftn32.dll" (ByVal dbfname$, ByVal location$) As Long
- #Else
- Private Declare Function lftnGetLocation Lib "lftn16.dll" (ByVal dbfname$, ByVal searchname$, ByVal location$) As Long
- Private Declare Function lftnGetFirstName Lib "lftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetNextName Lib "lftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetFirstDefName Lib "lftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetNextDefName Lib "lftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetFirstCalledItem Lib "lftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function lftnGetNextCalledItem Lib "lftn16.dll" (ByVal dbfname$, ByVal caller$, ByVal calleditem$, ByVal location$) As Long
- Private Declare Function lftnGetFirstFile Lib "lftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- Private Declare Function lftnGetNextFile Lib "lftn16.dll" (ByVal dbfname$, ByVal location$) As Long
- #End If
- '**** global flag ****
- Dim actflag As Integer
- Private Sub Command1_Click()
- End
- End Sub
- Private Sub Command2_Click()
- Dim dbfname As String
- Dim searchname As String
- Dim result As String
- result = String$(300, 0)
- dbfname = label1.Caption
- searchname = text1.Text
- If Left(dbfname$, 1) <> "" And Left(searchname$, 1) <> "" Then
- retval = sxtnGetLocation(dbfname$, searchname$, result$)
- label7.Caption = result$
- End If
- End Sub
- Private Sub Command3_Click()
- Dim string1 As String
- Dim result As String
- string1$ = label1.Caption
- result = String$(300, 0)
- list2.Clear
- actflag = True
- If Left(string1$, 1) <> "" Then
- label6.Caption = "working ..."
- retval = sxtnGetFirstFile(string1$, result$)
- If retval = 101 Then
- list2.AddItem result$
- Do
- retval = sxtnGetNextFile(string1$, result$)
- If retval = 101 Then
- list2.AddItem result$
- Else
- Exit Do
- End If
- Loop While retval = 101 And actflag = True
- End If
- End If
- label6.Caption = Str$(list2.ListCount) + " files"
- End Sub
- Private Sub Command4_Click()
- Dim dbfname As String
- Dim result As String
- dbfname$ = label1.Caption
- result = String$(300, 0)
- list1.Clear
- actflag = True
- If Left(dbfname$, 1) <> "" Then
- label5.Caption = "working ..."
- retval = sxtnGetFirstName(dbfname$, result$)
- If retval = 101 Then
- list1.AddItem result$
- Do
- retval = sxtnGetNextName(dbfname$, result$)
- If retval = 101 Then
- list1.AddItem result$
- Else
- Exit Do
- End If
- Loop While retval = 101 And actflag = True
- End If
- End If
- label5.Caption = Str$(list1.ListCount) + " items"
- End Sub
- Private Sub Command5_Click()
- Dim dbfname As String
- Dim result As String
- dbfname$ = label1.Caption
- result = String$(300, 0)
- list1.Clear
- actflag = True
- If Left(dbfname$, 1) <> "" Then
- label5.Caption = "working ..."
- retval = sxtnGetFirstDefName(dbfname$, result$)
- If retval = 101 Then
- list1.AddItem result$
- Do
- retval = sxtnGetNextDefName(dbfname$, result$)
- If retval = 101 Then
- list1.AddItem result$
- Else
- Exit Do
- End If
- Loop While retval = 101 And actflag = True
- End If
- End If
- label5.Caption = Str$(list1.ListCount) + " defined items"
- End Sub
- Private Sub Command6_Click()
- Dim dbfname As String
- Dim caller As String
- Dim location As String
- Dim calleditem As String
- dbfname$ = label1.Caption
- calleditem = String$(300, 0)
- location = String$(300, 0)
- caller = text1.Text
- list1.Clear
- actflag = True
- If Left(dbfname$, 1) <> "" Then
- label5.Caption = "working ..."
- retval = sxtnGetFirstCalledItem(dbfname$, caller$, calleditem$, location$)
- If retval = 101 Then
- list1.AddItem calleditem$
- Do
- retval = sxtnGetNextCalledItem(dbfname$, caller$, calleditem$, location$)
- If retval = 101 Then
- list1.AddItem calleditem$
- Else
- Exit Do
- End If
- Loop While retval = 101 And actflag = True
- End If
- End If
- label5.Caption = Str$(list1.ListCount) + " called items"
- End Sub
- Private Sub Command7_Click()
- actflag = False
- End Sub
- Private Sub Dir1_Change()
- ' When directory is changed, update path in Files control.
- file1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- ' When drive is changed, update directory control.
- ' (This also causes a Change event for the directory control).
- Dir1.Path = Drive1.Drive
- End Sub
- Private Sub File1_DblClick()
- ' When at the root level (for example, C:\) the Path property
- ' has a backslash (\) at the end. When at any other level,
- ' there is no final \. This code handles either case to build
- ' the complete path and filename of the selected file.
- If Right(file1.Path, 1) <> "\" Then
- label1.Caption = file1.Path & "\" & file1.filename
- Else
- label1.Caption = file1.Path & file1.filename
- End If
- End Sub
- Private Sub Form_Load()
- ' Set drive and path for controls to drive
- ' and directory where this application is located.
- Drive1.Drive = App.Path
- Dir1.Path = App.Path
- End Sub
- Private Sub List1_DblClick()
- Dim dbfname As String
- Dim searchname As String
- Dim result As String
- result = String$(300, 0)
- dbfname = label1.Caption
- searchname = list1.List(list1.ListIndex)
- If Left(dbfname$, 1) <> "" And Left(searchname$, 1) <> "" Then
- retval = sxtnGetLocation(dbfname$, searchname$, result$)
- label7.Caption = result$
- text1.Text = searchname
- End If
- End Sub
- Private Sub List2_DblClick()
- Dim dbfname As String
- Dim searchname As String
- Dim result As String
- dbfname$ = label1.Caption
- result = String$(300, 0)
- filename = list2.List(list2.ListIndex)
- list1.Clear
- If Left(dbfname$, 1) <> "" Then
- label5.Caption = "working ..."
- retval = sxtnGetFirstDefName(dbfname$, result$)
- If retval = 101 Then
- searchname = Left$(result, InStr(1, result, Chr$(0), 1) - 1)
- result = String$(300, 0)
- retval = sxtnGetLocation(dbfname$, searchname$, result$)
- If retval = 101 Then
- If InStr(1, result, filename, 1) Then
- list1.AddItem searchname$
- End If
- End If
- End If
- Do
- retval = sxtnGetNextDefName(dbfname$, result$)
- If retval = 101 Then
- searchname = Left$(result, InStr(1, result, Chr$(0), 1) - 1)
- result = String$(300, 0)
- retval = sxtnGetLocation(dbfname$, searchname$, result$)
- If retval = 101 Then
- If InStr(1, result, filename, 1) Then
- list1.AddItem searchname$
- End If
- End If
- Else
- Exit Do
- End If
- Loop While retval = 101
- End If
- label5.Caption = Str$(list1.ListCount) + " defined items in " + filename
- End Sub
- Private Function sxtnGetFirstCalledItem(dbfname$, caller$, calleditem$, location$) As Long
- If option1.Value = True Then
- sxtnGetFirstCalledItem = cftnGetFirstCalledItem(dbfname, caller, calleditem, location)
- ElseIf option2.Value = True Then
- sxtnGetFirstCalledItem = cstnGetFirstCalledItem(dbfname, caller, calleditem, location)
- ElseIf option3.Value = True Then
- sxtnGetFirstCalledItem = dftnGetFirstCalledItem(dbfname, caller, calleditem, location)
- ElseIf option4.Value = True Then
- sxtnGetFirstCalledItem = fftnGetFirstCalledItem(dbfname, caller, calleditem, location)
- ElseIf option5.Value = True Then
- sxtnGetFirstCalledItem = lftnGetFirstCalledItem(dbfname, caller, calleditem, location)
- End If
- End Function
- Private Function sxtnGetFirstDefName(dbfname$, location$) As Long
- If option1.Value = True Then
- sxtnGetFirstDefName = cftnGetFirstDefName(dbfname, location)
- ElseIf option2.Value = True Then
- sxtnGetFirstDefName = cstnGetFirstDefName(dbfname, location)
- ElseIf option3.Value = True Then
- sxtnGetFirstDefName = dftnGetFirstDefName(dbfname, location)
- ElseIf option4.Value = True Then
- sxtnGetFirstDefName = fftnGetFirstDefName(dbfname, location)
- ElseIf option5.Value = True Then
- sxtnGetFirstDefName = lftnGetFirstDefName(dbfname, location)
- End If
- End Function
- Private Function sxtnGetFirstFile(dbfname$, location$) As Long
- If option1.Value = True Then
- sxtnGetFirstFile = cftnGetFirstFile(dbfname, location)
- ElseIf option2.Value = True Then
- sxtnGetFirstFile = cstnGetFirstFile(dbfname, location)
- ElseIf option3.Value = True Then
- sxtnGetFirstFile = dftnGetFirstFile(dbfname, location)
- ElseIf option4.Value = True Then
- sxtnGetFirstFile = fftnGetFirstFile(dbfname, location)
- ElseIf option5.Value = True Then
- sxtnGetFirstFile = lftnGetFirstFile(dbfname, location)
- End If
- End Function
- Private Function sxtnGetFirstName(dbfname$, location$) As Long
- If option1.Value = True Then
- sxtnGetFirstName = cftnGetFirstName(dbfname, location)
- ElseIf option2.Value = True Then
- sxtnGetFirstName = cstnGetFirstName(dbfname, location)
- ElseIf option3.Value = True Then
- sxtnGetFirstName = dftnGetFirstName(dbfname, location)
- ElseIf option4.Value = True Then
- sxtnGetFirstName = fftnGetFirstName(dbfname, location)
- ElseIf option5.Value = True Then
- sxtnGetFirstName = lftnGetFirstName(dbfname, location)
- End If
- End Function
- Private Function sxtnGetLocation(dbfname$, searchname$, location$) As Long
- If option1.Value = True Then
- sxtnGetLocation = cftnGetLocation(dbfname, searchname, location)
- ElseIf option2.Value = True Then
- sxtnGetLocation = cstnGetLocation(dbfname, searchname, location)
- ElseIf option3.Value = True Then
- sxtnGetLocation = dftnGetLocation(dbfname, searchname, location)
- ElseIf option4.Value = True Then
- sxtnGetLocation = fftnGetLocation(dbfname, searchname, location)
- ElseIf option5.Value = True Then
- sxtnGetLocation = lftnGetLocation(dbfname, searchname, location)
- End If
- End Function
- Private Function sxtnGetNextCalledItem(dbfname$, caller$, calleditem$, location$) As Long
- If option1.Value = True Then
- sxtnGetNextCalledItem = cftnGetNextCalledItem(dbfname, caller, calleditem, location)
- ElseIf option2.Value = True Then
- sxtnGetNextCalledItem = cstnGetNextCalledItem(dbfname, caller, calleditem, location)
- ElseIf option3.Value = True Then
- sxtnGetNextCalledItem = dftnGetNextCalledItem(dbfname, caller, calleditem, location)
- ElseIf option4.Value = True Then
- sxtnGetNextCalledItem = fftnGetNextCalledItem(dbfname, caller, calleditem, location)
- ElseIf option5.Value = True Then
- sxtnGetNextCalledItem = lftnGetNextCalledItem(dbfname, caller, calleditem, location)
- End If
- End Function
- Private Function sxtnGetNextDefName(dbfname$, location$) As Long
- If option1.Value = True Then
- sxtnGetNextDefName = cftnGetNextDefName(dbfname, location)
- ElseIf option2.Value = True Then
- sxtnGetNextDefName = cstnGetNextDefName(dbfname, location)
- ElseIf option3.Value = True Then
- sxtnGetNextDefName = dftnGetNextDefName(dbfname, location)
- ElseIf option4.Value = True Then
- sxtnGetNextDefName = fftnGetNextDefName(dbfname, location)
- ElseIf option5.Value = True Then
- sxtnGetNextDefName = lftnGetNextDefName(dbfname, location)
- End If
- End Function
- Private Function sxtnGetNextFile(dbfname$, location$) As Long
- If option1.Value = True Then
- sxtnGetNextFile = cftnGetNextFile(dbfname, location)
- ElseIf option2.Value = True Then
- sxtnGetNextFile = cstnGetNextFile(dbfname, location)
- ElseIf option3.Value = True Then
- sxtnGetNextFile = dftnGetNextFile(dbfname, location)
- ElseIf option4.Value = True Then
- sxtnGetNextFile = fftnGetNextFile(dbfname, location)
- ElseIf option5.Value = True Then
- sxtnGetNextFile = lftnGetNextFile(dbfname, location)
- End If
- End Function
- Private Function sxtnGetNextName(dbfname$, location$) As Long
- If option1.Value = True Then
- sxtnGetNextName = cftnGetNextName(dbfname, location)
- ElseIf option2.Value = True Then
- sxtnGetNextName = cstnGetNextName(dbfname, location)
- ElseIf option3.Value = True Then
- sxtnGetNextName = dftnGetNextName(dbfname, location)
- ElseIf option4.Value = True Then
- sxtnGetNextName = fftnGetNextName(dbfname, location)
- ElseIf option5.Value = True Then
- sxtnGetNextName = lftnGetNextName(dbfname, location)
- End If
- End Function
-